
#pragma once
#include "resource.h"
#include "afxwin.h"

//Ji
#define MAX_NUM_NODE_NAME 10 //Node name allows a maximum of 19 characters
#define MAX_NUM_COMMET 20 //Comment allows a maximum of 99 characters
#define MAX_NUM_IEEEADDRESS 8 //Comment allows a maximum of 8 characters

// CDialogAddNewNode dialog

class CDialogAddNewNode : public CDialog
{
	DECLARE_DYNAMIC(CDialogAddNewNode)

public:
	CDialogAddNewNode(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDialogAddNewNode();

// Dialog Data
 	enum	{ IDD  =  IDD_ADDNEWNODE };

public:
	char NodeName[20];
	TCHAR NodeComment[100];
	unsigned char NodeIEEEAddress[9];
	CPoint NodePosition;
	bool OKSelected;
	bool NewNode;

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
protected:
	virtual void OnOK();
public:
	CStatic m_NodePosition;
public:
//	afx_msg void OnBnClickedOk();

//Ji
public:
	int StrLenEx(CString csText);
public:
	bool TestIllegalCharacter(CString, int); //Test the illegal character

public:
	CEdit m_ctrlEdit1NodeName;
public:
	CEdit m_ctrlEdit1Comment;
public:
	CEdit m_ctrlEdit1Address;

public:
	CString m_szEdit1NodeName;
public:
	CString m_szEdit1Address;
};
